//
//  GroupModel.m
//  UITableView
//
//  Created by cocoazxj@163.com on 15/3/26.
//  Copyright (c) 2015年 handcool. All rights reserved.
//

#import "GroupModel.h"

@implementation GroupModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self == [super init])
    {
        self.name = dict[@"title"];
        self.money = dict[@"price"];
        self.num = dict[@"buyCount"];
        self.imageName = dict[@"icon"];
    }
    return self;
}
+ (instancetype)groupWithDict:(NSDictionary *)dict
{
    return [[self alloc] initWithDict:dict];
}

- (UIImage *)image
{
    return [UIImage imageNamed:self.imageName];
}
@end
